# Maintainer: Caleb Connolly <caleb@connolly.tech>
pkgname=buffyboard
pkgver=3.1.0
pkgrel=0
_lvgl_commit="47ec2784d8e7683216d206dcdd7688ea3b785a63"
pkgdesc="Touch-enabled framebuffer keyboard (not only) for vampire slayers"
url="https://gitlab.com/postmarketOS/buffybox/buffyboard"
arch="all"
license="GPL-3.0-or-later"
source="https://gitlab.com/postmarketOS/buffybox/-/archive/$pkgver/buffybox-$pkgver.tar.gz
	https://github.com/lvgl/lvgl/archive/$_lvgl_commit.tar.gz"
makedepends="meson libinput-dev libxkbcommon-dev linux-headers eudev-dev inih-dev"
builddir="$srcdir/buffybox-$pkgver"

prepare() {
	default_prepare

	mkdir -p "$builddir"/lvgl
	mv "$srcdir"/lvgl-$_lvgl_commit/* "$builddir"/lvgl
}

build() {
	cd buffyboard
	abuild-meson . output
	meson compile -C output
}

check() {
	cd buffyboard
	meson test --no-rebuild -C output
}

package() {
	cd buffyboard
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
3853b7fd0fc0314e58a2f18f8cf9641e5205bf75cccaf3606cca469959b07e8db9691974d02cc76165816e75bb58fcfb9021ba6abbe6c59e06785daaaae81b6f  buffybox-3.1.0.tar.gz
79fc7079ebc6c32698154d5bf08498b226fabb4fd5b9cbd489a12ce8e6638163b56ce7d83a5f6882f3838ad3616ff60ee5a1ceec0d6b52d1869e4f6f283db929  47ec2784d8e7683216d206dcdd7688ea3b785a63.tar.gz
"
